<%--
  Created by IntelliJ IDEA.
  User: XPS15
  Date: 2022/2/28
  Time: 10:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" +
          request.getServerPort() + path + "/";
%>
<base href="<%=basePath%>">

<html>
  <head>
    <title>My First Web</title>
  </head>
  <body>
  <tr style="margin-left: 45%;margin-top: 300px">
    <tr>当前共有${visitcount}人在线！</tr>

      <td><button id="login" style="width: 100px;height: 50px" onclick="login()">登录</button>
          <button id="register" style="width: 100px;height: 50px" onclick="reg()">注册</button>
          <button id="my" style="width: 100px;height: 50px" onclick="my()">主页</button></td>
    </tr>
  </body>
<script>
  function login(){
    window.location.href = "<%=basePath%>view/login.jsp"
  }
  function reg(){
    window.location.href = "<%=basePath%>view/register.jsp"
  }
  function my(){
    window.location.href = "/myweb/showServlet";
  }

</script>
</html>
